package com.migration.model.newdb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * AI供应商配置表 实体类
 * 表名：ai_provider_config
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "ai_provider_config")
public class AiProviderConfig implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 配置名称
     */
    @Column(name = "config_name", nullable = false, length = 255)
    private String configName;
    
    /**
     * 供应商类型
     */
    @Column(name = "provider_type", nullable = false, length = 100)
    private String providerType;
    
    /**
     * 模型名称
     */
    @Column(name = "model_name", nullable = false, length = 255)
    private String modelName;
    
    /**
     * API密钥
     */
    @Column(name = "api_key", length = 512)
    private String apiKey;
    
    /**
     * 主机地址
     */
    @Column(name = "host_url", nullable = false, length = 512)
    private String hostUrl;
    
    /**
     * 是否默认 (0否 1是)
     * 默认值: 0
     */
    @Column(name = "is_default", nullable = false)
    private Boolean isDefault;
    
    /**
     * 备注
     */
    @Column(name = "remark", length = 65535)
    private String remark;
    
    /**
     * 状态 (0停用 1启用)
     * 默认值: 1
     */
    @Column(name = "status", nullable = false)
    private Boolean status;
    
    /**
     * 创建人
     */
    @Column(name = "create_by", length = 50)
    private String createBy;
    
    /**
     * 创建时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "create_time")
    private java.time.LocalDateTime createTime;
    
    /**
     * 更新人
     */
    @Column(name = "update_by", length = 50)
    private String updateBy;
    
    /**
     * 更新时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "update_time")
    private java.time.LocalDateTime updateTime;
    
    /**
     * 删除标识 (0正常 1删除)
     * 默认值: 0
     */
    @Column(name = "del_flag", nullable = false)
    private Boolean delFlag;
    
    /**
     * 模型温度参数，控制输出随机性，范围0-1
     */
    @Column(name = "temperature")
    private Double temperature;
    
    /**
     * 模型top_p参数，控制输出多样性，范围0-1
     */
    @Column(name = "top_p")
    private Double topP;
    
    /**
     * 最大生成的tokens数量
     */
    @Column(name = "tokens")
    private Integer tokens;
    
    @Override
    public String toString() {
        return "AiProviderConfig{" +
            "id=" + id +
            ", configName=" + configName +
            ", providerType=" + providerType +
            ", modelName=" + modelName +
            ", apiKey=" + apiKey +
            ", hostUrl=" + hostUrl +
            ", isDefault=" + isDefault +
            ", remark=" + remark +
            ", status=" + status +
            ", createBy=" + createBy +
            ", createTime=" + createTime +
            ", updateBy=" + updateBy +
            ", updateTime=" + updateTime +
            ", delFlag=" + delFlag +
            ", temperature=" + temperature +
            ", topP=" + topP +
            ", tokens=" + tokens +
        '}';
    }
} 